/* src/router/index.js */
import { createBrowserRouter, Navigate } from "react-router-dom";
import Layout from "../layout/index.tsx";
import Home from "../views/home/index.tsx";
import Test from "../views/test/index.tsx";
import React from "react";
const routes = [
  {
    path: "/",
    Component: Layout,
    children: [
      //重定向
      {
        path: "/",
        element: <Navigate to="/home" />,
      },
      {
        path: "home",
        Component: Home,
      },
      {
        path: "Test",
        Component: Test,
      },
    ],
  },
];

export default createBrowserRouter(routes);
